#ifndef _BASESHADERCLASS_H_
#define _BASESHADERCLASS_H_

#include <d3d11.h>
#include <d3dx10math.h>
#include <d3dx11async.h>

class ShaderClass
{
protected:
	struct MatrixBufferType
	{
		D3DXMATRIX world;
		D3DXMATRIX view;
		D3DXMATRIX projection;
	};

public:

	ShaderClass();
	virtual ~ShaderClass();
	
	virtual bool Initialize(ID3D11Device*) { return true; };
	virtual bool Render(ID3D11DeviceContext*, int, D3DXMATRIX, D3DXMATRIX, D3DXMATRIX, ID3D11ShaderResourceView*, float) { return true; };

protected:

	virtual bool InitializeShader(ID3D11Device*, WCHAR*, WCHAR*, WCHAR*, WCHAR*) { return true;};
	virtual void ShutdownShader();
	
	void RenderShader(ID3D11DeviceContext*, int);
	void OutputShaderErrorMessage(ID3D10Blob*);

protected:

	ID3D11VertexShader* m_vertexShader;
	ID3D11PixelShader*	m_pixelShader;
	ID3D11HullShader*	m_hullShader;
	ID3D11DomainShader* m_domainShader;
	ID3D11InputLayout*	m_layout;
	ID3D11Buffer*		m_matrixBuffer;

};

#endif